package com.qbw.app.model;

import androidx.databinding.Bindable;

/**
 * @author QBW
 * @date 2019/9/4
 */
public class VehicleHomeInfo extends BaseModel {
    private Coolant coolantTemperature;
    private ProblemStatus fault;
    private Mileage mileage;
    private ResidualFuel residualFuel;
    private com.qbw.app.model.Voltage voltage;
    private Warning.HomeInfo alarmInfo;
    private TireData tirePressure;
    private long flameoutLastTime; // 最后一个熄火的时间
    private Location location;
    private Vehicle vehicle;

    public Coolant getCoolantTemperature() {
        return coolantTemperature;
    }

    public void setCoolantTemperature(Coolant coolantTemperature) {
        this.coolantTemperature = coolantTemperature;
    }

    public ProblemStatus getFault() {
        return fault;
    }

    public void setFault(ProblemStatus fault) {
        this.fault = fault;
    }

    public Mileage getMileage() {
        return mileage;
    }

    public void setMileage(Mileage mileage) {
        this.mileage = mileage;
    }

    public ResidualFuel getResidualFuel() {
        return residualFuel;
    }

    public void setResidualFuel(ResidualFuel residualFuel) {
        this.residualFuel = residualFuel;
    }

    public com.qbw.app.model.Voltage getVoltage() {
        return voltage;
    }

    public void setVoltage(com.qbw.app.model.Voltage voltage) {
        this.voltage = voltage;
    }

    public Warning.HomeInfo getAlarmInfo() {
        return alarmInfo;
    }

    public void setAlarmInfo(Warning.HomeInfo alarmInfo) {
        this.alarmInfo = alarmInfo;
    }

    public TireData getTirePressure() {
        return tirePressure;
    }

    public void setTirePressure(TireData tirePressure) {
        this.tirePressure = tirePressure;
    }

    public long getFlameoutLastTime() {
        return flameoutLastTime;
    }

    public void setFlameoutLastTime(long flameoutLastTime) {
        this.flameoutLastTime = flameoutLastTime;
    }

    public static class CoolantTemperature extends BaseModel {
        private int state;
        private double value;

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public double getValue() {
            return value;
        }

        public void setValue(double value) {
            this.value = value;
        }
    }

    public static class Fault extends BaseModel {
        private int state;
        private int value;

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public int getValue() {
            return value;
        }

        public void setValue(int value) {
            this.value = value;
        }
    }

    public static class Mileage extends BaseModel {
        private int state;
        private double value;

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        @Bindable
        public double getValue() {
            return value;
        }

        public void setValue(double value) {
            this.value = value;
        }
    }

    public static class ResidualFuel extends BaseModel {
        private int rivingState;
        private int state;
        private double value;

        public int getRivingState() {
            return rivingState;
        }

        public void setRivingState(int rivingState) {
            this.rivingState = rivingState;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        @Bindable
        public double getValue() {
            return value;
        }

        public void setValue(double value) {
            this.value = value;
        }
    }

    public static class Voltage extends BaseModel {
        private long lastUpdateTime;
        private int state;
        private double value;

        public long getLastUpdateTime() {
            return lastUpdateTime;
        }

        public void setLastUpdateTime(long lastUpdateTime) {
            this.lastUpdateTime = lastUpdateTime;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public double getValue() {
            return value;
        }

        public void setValue(double value) {
            this.value = value;
        }
    }

    public Vehicle getVehicle() {
        return vehicle;
    }

    public void setVehicle(Vehicle vehicle) {
        this.vehicle = vehicle;
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public static class Response extends BaseResponse<VehicleHomeInfo> {
    }
}
